package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Answer;
import cn.wolfcode.trip.base.query.QueryObject;
import java.util.List;

/**
 * 回答mapper
 */
public interface AnswerMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Answer record);

    Answer selectByPrimaryKey(Long id);

    List<Answer> selectAll();

    List<Answer> selectByQuestionId(Long id);

    /**
     * 获取某个问题的回答数量
     * @param id
     * @return
     */
    int selectNumByQuestionId(Long id);

    /**
     * 查询某个问题的所有回答
     * @param qo
     * @return
     */
    List<Answer> selectForList(QueryObject qo);
}